#ifndef MYPUSHBUTTON_H
#define MYPUSHBUTTON_H

#include <QObject>
#include <QPushButton>
#include <QLayout>
#include <QLabel>
#include <QEvent>
#include <QMouseEvent>
#include <qgsettings.h>
#include "iconBtn.h"
#define THEME_QT_SCHEMA "org.ukui.style"


class CustomNaviButton : public QPushButton
{
    Q_OBJECT
public:
    explicit CustomNaviButton(int tabName, QWidget *parent = 0);
    void changeFont(QFont curFont);
    void changePageForTheme(const QString& str);

protected:
    bool eventFilter(QObject *obj, QEvent *event) override;
private:
    //func
    void initUI(int tabName);
    void initStyleTheme();
    void setIcon(QString &strIcon);
    //member
    QHBoxLayout *mp_wholeHL;
    QLabel *mp_btnIcon;
    QLabel *mp_btnName;

    QString m_strIcon = "";
    QString m_strText = "";
    QGSettings *m_styleSettings = nullptr;
    QString m_strThemeName = "ukui-default";
    bool m_isNormal = true;
    bool m_isHover = false;
};

#endif // MYPUSHBUTTON_H
